Skip to content

[Config] Make ecs.php extensible instead of fully replaceable#16

Closed
coisa wants to merge 1 commit intomainfrom
feature/issue-6-extensible-ecs-config
Closed

[Config] Make ecs.php extensible instead of fully replaceable#16
coisa wants to merge 1 commit intomainfrom
feature/issue-6-extensible-ecs-config

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 9, 2026

Summary

  • Introduced EcsConfigFactory class with create() and loadBaseConfiguration() methods
  • Updated ecs.php to return ECSConfigBuilder directly for consumer extensibility
  • Added usage examples in docblocks for require + extend pattern
  • Added tests for EcsConfigFactory

Implementation

The solution provides multiple ways for consumers to extend the ECS configuration:

  1. Direct usage: return require __DIR__ . '/vendor/fast-forward/dev-tools/ecs.php';
  2. Factory pattern: return EcsConfigFactory::create();
  3. Extend with custom rules: return $builder->withRules([CustomRule::class]);

This allows consumers to build on top of the base configuration without copying the entire file, preserving the ability to receive upstream updates automatically.

Closes #6

- Introduce EcsConfigFactory class with create() and loadBaseConfiguration() methods
- Update ecs.php to return ECSConfigBuilder directly for consumer extensibility
- Add usage examples in docblocks for require + extend pattern
- Add tests for EcsConfigFactory

Implements: #6
@coisa coisa closed this Apr 9, 2026
@coisa coisa deleted the feature/issue-6-extensible-ecs-config branch April 9, 2026 01:53
@coisa
Copy link
Copy Markdown
Contributor Author

coisa commented Apr 9, 2026

Closing this PR because the changes introduced here became inconsistent and hard to review due to issues in the automated generation process.

Instead of trying to fix this incrementally, the work will be redone in a clean, focused follow-up PR to ensure better structure, clarity, and reviewability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make ecs.php extensible instead of fully replaceable

1 participant